using UnityEngine;

public class PlayerState_轻棍3 : PlayerStateBase
{
	private ItemSO_Data_Player招式_系数 _力竭系数;

	public PlayerState_轻棍3()
	{
		_Data_Player招式_系数 = MonoSingleton<MyDataManager>.Instance._Data_玩家招式._轻击_3;
		_力竭系数 = MonoSingleton<MyDataManager>.Instance._Data_玩家招式._轻击_0;
	}

	public override void OnEnter()
	{
		_Mono._Ani.Play("轻攻击3");
		_Mono._Rb2D.velocity = Vector2.zero;
		_Mono.F_玩家转向(Input.GetAxisRaw("Horizontal"));
		_Mono._Rb2D.AddForce(new Vector2((_Mono._朝向右边 ? 1 : (-1)) * 40, 0f), ForceMode2D.Impulse);
		_Timer = _Mono._Dict_AniName_time["轻攻击3"];
		_NextState = StateType_Player.正常移动;
		_Mono._C_攻击判断._击退力度 = 12f;
		if (_Mono._Curr气力 < _Data_Player招式_系数._气力消耗)
		{
			F_创建攻击命中回调(_力竭系数);
		}
		else
		{
			F_创建攻击命中回调();
		}
	}

	public override void OnExit()
	{
		_Mono._C_攻击判断._攻击命中回调 -= F_攻击命中回调;
	}

	public override void OnUpdate()
	{
		base.OnUpdate();
		if (Input.GetKeyDown(KeyCode.L))
		{
			F_翻滚();
		}
	}

	public override void F_翻滚()
	{
		_Mono.ChangeState(StateType_Player.翻滚);
	}
}
